#include<stdio.h>

#define N 100

int main()
{
	int i,j,age,sum=0;
	
	for(age=1;age<100;age++)
		for(i=1;i<100;i++)
		{	
			sum = (i+1)*age + i*(i+1)/2;
			if(sum==236)
			{
				printf("%d\n%d",age,i);
				break;
			} 		
		}
	return 0;
} 
